FAQ: Changelog for PowerHome 2.1.5c
Knowledge Notes

Here is the changelog for 2.1.5c:

Changed 1-wire controller to support an exponential moving average for 1-wire sensor values. The user can choose the number of samples from 1 to 99 by modifying the "Point" column in the Analog I/O screen. Sensors that normally use a value of 0 can now have a value from 101 to 199 with 101 being 1 sample (effectively the same as no averaging) and 199 being 99 samples. For a normal point value of 1 the averaging point values are 201 - 299. Normal point values of 2 have averaging values of 301 - 399. Changed 1-wire controller to support the "Raw to Calculated" formula column so that adjustments to the calculated value can be performed. This is useful in adding offsets to sensors that don't read properly.

Added bounds checking for the f_char function so that a critical error is prevented. When an out of range parameter is passed, an automessage will now appear along with an entry in the eventlog. The result of the out of bound function will return a 0.

Rewrote the Global Cache socket disconnect detection code and automatic reconnect routines. Also fixed an error that could cause the Global Cache to hang requiring a disconnect/reconnect when an unknown command was sent.

Rewrote the macro messagebox and inputbox routines so that blank parameters will no longer cause a hang or a messagebox that won't go away. Now an automessage error will appear when required parameters are blank.

Corrected a serious bug introduced in version 2.1.5b that prevented links from being created in the Insteon Explorer.

Modified webserver to reverse a change introduced in 2.1.5b that effected the viewport meta tag and how PowerHome webpages are displayed on iphone and android devices.

Corrected problem in PowerHome Explorer that prevented the window from staying maximized and always reverted to a windowed mode.

Added code to prevent a critical error that sometimes occurred in the ue_trayevent executing the OpenIcon function.

Corrected a problem in the PowerHome Remote Control Center application that would cause the system to crash when executed in the non-tab mode and global variables were updated. This also fixes the problem where the wrong data would sometimes be displayed in various global variable fields.

New Plugins:
None

New Functions:
None

Changed Functions:
None

Removed Functions:
None

PWRHOME.INI Changes:
None

Database Changes:
None

Here is the changelog for 2.1.5b:

Fixed major bug with PowerHome execution queue that resulted in random errors manifesting as queued
actions never being executed and disappearing, actions being executed multiple times when they were only submitted once, and actions being executed with the wrong parameters and variables (such as a formula trying to be executed as a macro). This fix should take care of all known execution queue problems.

Added new ini parameter priority under section [Device Status] allowing user to select the priority that device status actions are queued at.

Added new ini parameter priority under section [Control Center] allowing user to select the priority that control center actions are queue at.

Modified the Remove Device Status program to make use of the new Device Status priority setting.

Webserver processing modified to respect new control center and device status priorities. Also modified internal processing so there is a better chance that the change in status will be reflected when next page is loaded.

Modified webserver device status page to remove unnecessary form data for devices which are display only.

Modifed the webserver device status screen to allow for specifying the desired columns and order. Added new INI parameter DSCOLUMNS under the [WebServer] section to store this setting. The current allowed columns are numbered 1 thru 7 and are: Control, Status, Device Name, Location, Type, ID, Last Changed. The default is blank which is equivalent to 1,2,3,4,5,6,7

Added internal variables to webserver to track total requests, bad logins, trusted logins, etc. Also added the ability to programmatically enable and disable the webserver. Access these new variables and functions using the new ph_system function. See the help file for more details.

Added new DEVICECONTROL command to socketserver. Made this command use the new device status priority setting. Also modified the CCACTION command so that it uses the new control center button priority setting.

Added INI setting to store the status bar height for the PowerHome Multi-Editor.

Added code to prevent a critical error that could occur while using menu options in the PowerHome Multi-Editor.

Modified ph_webds function to allow for specifiying the device status columns and desired order for the web based Device Status screen.

Added new ini parameter reinitmethod under the [System] section allowing user to select the method used to reinitialize PowerHome. Setting parameter to 0 will use the current method where a portion of PowerHome stays active. Setting parameter to 1 will cause PowerHome to fully shutdown and then restart itself. The default is 1.

Modified PowerHome Status screen to allow for the hiding of titles and resize borders to maximize screen space. Modified some of the windows for a better fit. Also modified so that window size/position is saved automatically upon exiting. Minor changes to some screens.

Fixed bug in URLScraper plugin where a overflow runtime error 6 can occur with certain frequencies.

Created new URLScraper1 plugin that uses a raw socket vs an HTTP control in the URLScraper plugin. Solves obscure problems with certain websites that refuse to work with the HTTP control. URLScraper is still the preferred plugin to use since it supports SSL.

Added small mod to the load plugin routine to trim any leading/trailing spaces for the launch data string. If the launch data has an extraneous leading or trailing space then the plugin will not load properly and return -2.

Documented the SALOGDIR environment variable for the ph_backupdb function.

Modified w_msgbox window so that if oversized, it will fit on the screen and add a vertical scrollbar.

Fixed timeout issue associated with ph_getitcurl function.

Modified PowerHome Explorer macro detail window to allow for comments field to fit on screen. Currently, the formula field resizes to fill the screen pushing the comments field off to the right. The comments field size is not taken into account when doing a window resize. Also added a button to show/hide comments.

Modified PowerHome Explorer window title to reflect the actual screen type currently active. This has the benefit of being able to distinguish between multiple open Explorer windows under the open window list in the "Windows" menu option.

Rewrote the PowerHome Virtual serial port plugin to no longer be an activex exe. New version has gone back to being a standard OCX and previous issues have been fixed.

Corrected issue in Global Cache reconnect code. Critical error should no longer appear.

Added new Elk controller command to perform a full refresh of all Elk devices (also fires device change triggers as necessary if requested). New Elk controller command 1000. parm1 = 0 retrieves all. parm1 = 1 thru 7 retrieves individual sections. parm2 = 0 will fire triggers, parm2 > 0 will not fire triggers. See help file for more info.

Rewrote eventlog viewer to correct all known issues introduced with version 2.1.5. Viewer is still a multi-threaded viewer.

Completely rewrote Device Status screen update mechanism. This fixes an issue where the Device Status screen would require manually closing and reopening in order for changes made via Insteon group or group cleanup commands (and others) to appear. Changes now all appear in realtime.

Corrected reported errors concerning Timedevents. Rewrote the entire timedevents section. You can no longer create a timed event in the past (they will always have logic applied to bring them in the future). Also, when executing past due events, the past due event will ONLY be executed once and the reftime/starttime brought to the next logical event in the future.

Updated Insteon thermostat code to add support for the new extended insteon discrete get cool setpoint and get heat setpoint commands of the 2441 thermostat. Also added extended command support for older thermostats as well.

Added support for the 1-wire DS18B20 devices (family code 0x28) to the 1-wire controller.

Added the ability to have the formula builder popup window (the window that opens when double-clicking the formula field within macrodetail and other screens) resizeable. The current size will be stored when the window is closed and reopened at that size. The statusbar height is also saved and restored.

Added ability to Insteon Explorer Links screen so that non-standard Local Ramprates can be entered (0 thru 255) instead of just the dropdown values of 0 thru 31. Also added ability to enter a value in seconds and have it converted to the closest ramprate. To enter a value in seconds follow the value with a lowercase "s". Entering in "20s" would result in the value being changed to the closest ramprate to 20 seconds.

Added code to highlight when a critical error has occurred and that PowerHome must be restarted.

Added the x, y, height, and width info of a selected object to the Control Center design properties window.

Added Copy/Paste capability to the Control Center Objects screen in PowerHome Explorer (same mechanism as used for macro detail). Use control and shift click to highlight rows and then right click and choose desired action from popup menu.

New Plugins:
URLScraper1

New Functions:
ph_datetime,ph_system

Changed Functions:
ph_webds

Removed Functions:
ph_insteonprodlistimport

PWRHOME.INI Changes:
[WSH Editor]
statusheight=348

[WebServer]
DSCOLUMNS=

[System]
reinitmethod=1

[Device Status]
priority=1

[Control Center]
priority=1

[PowerHome Status]
titles=no

[FormulaEditor]
width=2377
height=1448
statusheight=348

Database Changes:
None

Here is the changelog for 2.1.5a:

Added code to automatically refresh a Control Center tab (if the Control Center is currently open) when changes are made to it via the CC Design screen or through the PowerHome Explorer.

Added routines to the Insteon controller to break out of the endless loop of trying to CREATE INITIAL I2CS LINK when it is failing. After 3 attempts, the device will be updated as if the initial link was created and will then be allowed to move on to the next step (SCAN I2CS LINKS).

Modified Insteon controller to properly update Insteon PLM controller groups in response to external actions (direct control, etc). Device Status screen will now auto update without having to close and reopen.

Updated Insteon PLC controller so that the PLC should now work with. Version 2.1.5 introduced a regression where the PLC was unable to be used.

Corrected critical error that would occur in PowerHome Explorer if the far left "child" button was double clicked.

Added message "No Options available for this device" to the Insteon options screen from the Devices tab in Insteon Explorer for devices that either don't have options or have not yet been implemented.

Modified the Set XY and Set HW popups in CC Design view so that if multiple objects are selected, the default of Overwrite or Add is set to Add. Default is still overwrite if a single object is selected. Removed control menu from these screens as closing the window could cause objects to disappear.

Modified the Set % popup in CC Design view so that when cancelling, the selected objects are no longer deleted.

Corrected issue in Devices tab of Insteon Explorer where the "Replace Address" column is unable to be used.

Fixed problem in both PowerHome Multi-editor and Formula builder where the dropdown for global variables was not showing.

PowerBuilder runtimes and PowerHome Executables have been upgraded to the latest version of PowerBuilder 12.5.2 build 5629.

Here is the changelog for 2.1.5.

NOTE: This changelog represents cumulative changes since version 2.1b.

Version 2.1.4 did not have a changelog, so changes in that version (that still exist in 2.1.5) will be listed here. 

PowerHome code has been updated to the latest version of PowerBuilder libraries (version 12.5). 

Database engine has been upgraded to SQL Anywhere 11 from Adaptive Server Anywhere 7. 

New Insteon engine with full I2CS support. All previous Insteon bugs should be resolved. New Insteon tables hold all published Insteon device types and will be auto-added to the Insteon Types table during auto discovery. NOTE that some I2CS devices may be firewalled and not readily "discovered" by programatic methods. See discussion about this issue in "FAQs-Setting up Thermostats in PH 2.1.5" for more information on how to resolve this, should it be a problem.

I2CS Thermostats now fully supported. NOTE: PH Version 2.1.5 on, uses a significantly different approach to Thermostat support than previous PH Versions did. See Help File "FAQs-Setting up Thermostats in PH 2.1.5" for detailed information.

New Options window for Insteon devices. Allows for extended programming of various Insteon devices. 

The Options window is accessed via the Options button in the Insteon Explorer Devices tab.

Options Window

Insteon KPL config has been updated to use the Insteon KPL configuration commands (instead of the old peek/poke memory locations). KPL tab has been removed from Insteon Explorer and added to the new Insteon Options window. Peek/Poke commands still available for legacy devices. 

Added support for Insteon GarageHawk. 

Changed most timing operations within PowerHome to a single background multi-threaded object. Should solve contention issues between multiple components. 

All references to MSCOMM32 (Microsoft COMM control) have been removed. Serial port controls have all been replaced with COMM32 control. Allows COM ports 1 thur 255. 

All references to MSWINSCK (Microsoft Winsock control) have been removed. All socket controls have been upgraded with Catalyst 8 controls. 

All plugins have been brought up to current controls (serial/winsock) and current codebase (PowerBuilder plugins are 12.5). This should solve the problems people were having with the PH_CID plugin.

Eventlog and weblog tables have been moved to their own database (phlogs.db). No more corrupt databases due to the eventlog and weblog growing to very large sizes. 

Eventlog report has been rewritten as a background thead with the option to cancel retrieval. No more hanging of PowerHome when retrieving very large logs. Start reviewing log immediately while retrieval continues in the background. 

New log options. Resume Macro will fire when a macro is resumed from waiting. Verbose macro will cause the existing Macro and the new Resume Macro to also display in the Event Log the values of [LOCAL1] thru [LOCAL10] and [TEMP1] thru [TEMP10]. Now you'll be able to get a better idea of what is going on with your macros until the macro debugger is released. 

These posting parameters are accessed in the PowerHome Explorer>Setup>Logs object.

LOGS-Posting

New Analog device types. Dedicated analog types for Insteon GarageHawk, IOLinc, EZRain/EZFlora, Insteon Responder Group (eliminates need for virtual Insteon devices), etc. Allows for complete control of these devices without having to do any scripting. 

Thermostats table has been deprecated. Insteon and Elk Thermostats have their own individual device types (Temperature, Cool SetPoint, etc) in the Analog I/O table. While this is a substantial improvement, unfortunately it means that prior Thermostat coding in earlier versions of PH will have to be re-visited in order to obtain full benefits. See Help File "FAQs-Setting up Thermostats in PH 2.1.5" for detailed information.

Timed Events routine has been reworked to solve problem with disappearing timed events. Now using update instead of Delete/Insert during timed event processing. 

New labeling system added. Add one or more user defined labels to devices, macros, triggers, etc. Filter by label in PowerHome Explorer and Device Status screen. Group devices, formulas, macros, etc. together logically. 

New 1-wire controller type. Support 1-wire devices directly within PowerHome. This controller runs in a separate thread due to the overhead of 1-wire communications. 

New generic parallel port controller type. 

New CM15A controller type. Supports both PLC and RF capabilities of this device. 

New Insteon SmartLinc/NetLinc/Hub controller type. Connect directly to Insteon IP capable PLM's without having to use a virtual serial port. 

Virtual Serial Port plugin updated to use the latest version 7.2 of Eltima controls. Plugin rewritten to be an activex EXE (rather than OCX) for better reliability and stability. 

Reworked execution queue to support priority and top items. See ph_postexequeue function. 

Direct control and status of Controllers from the PowerHome UI. Under Help->About->Controllers, you'll be able to see the connect status of the controllers as well as change the status. 

New options to select lines in a macro and delete, cut, copy, or paste them to other macros (or the current macro). 

To use this feature CTRL-Click on any Macro line of code and the entire line will be selected. Additional CTRL-Clicks will select additional individual lines of code, while a Shift_Click will select all lines between the first and last Click.

Macro Cut/Paste

Once your Selection is made, Right-Click the mouse anywhere in the Macro and a context menu will appear. Choose the "Selected" menu item and the desired action.

If you Cut/Copy, you can Paste it in this or another Macro. After you select a target row, you can then Paste and the clipboard content will be Inserted at that location. It inserts, not overwrites, so following lines will be moved down to make room.

New regular expression capability (available in functions ph_regex2, ph_regexdiff2, and ph_regexsnap2). This regular expression syntax is the same as VB and offers many more options than the regex functionality in Scintilla. Reference this website for very detailed documentation concerning this syntax: http://www.regular-expressions.info/vb.html 

Webserver and Socket Server rewritten to eliminate contention errors. 

Webserver has additional security options (cookie) and now supports SSL. 

SMTP email functions have all been rewritten to use Catalyst SMTP control vs a raw socket. Improved stability and performance. New ph_sendsmtpemailasync function allows you send email asynchronously rather than holding up PowerHome execution waiting for the email function to return. 

Numerous bugfixes, critical error fixes, and tweaks throughout. Too many to list. Since alot of the base code is completely new, please re-report any bugs or critical errors as they occur. 

New Plugins: 
Virtual Serial Port, Roku, Directory Monitor, Windows Lock Monitor, AVTech DVR control, Windows Monitor, Growl Control, ODBC Database Control, Windows Power Monitor, URL Scraper 

New Functions: 
d2h, h2d, h2s, ph_base64decode1, ph_convertir, ph_ctlrcontrol, ph_decrypt, ph_deletetimedevent, ph_encrypt, ph_fill, ph_formulabtnparm, ph_funcdef, ph_funclist, ph_getdevicestat, ph_getdeviceval, ph_getlasterrorstring, ph_getmd5hash, ph_getmd5hash1, ph_getmtret, ph_getothercounter, ph_getsyspwrstat, ph_gettstat, ph_gettstat_s, ph_geturl1, ph_geturlviaproxy1, ph_getvarsub, ph_htmlescape1, ph_insteonprodlistimport, ph_insteonrawext, ph_insteonwithret1, ph_insteonwithretext, ph_insteonwithretext1, ph_isssrunning, ph_iswslocked, ph_latlongdist, ph_locatehandle1, ph_lockworkstation, ph_minutestostring, ph_not, ph_number, ph_pad, ph_ping1, ph_postexequeue, ph_posturl1, ph_posturlviaproxy1, ph_random, ph_regex2, ph_regexdiff2, ph_regexsnap2, ph_retrievevars, ph_runasuser1, ph_runsync1, ph_saveurl1, ph_saveurlviaproxy1, ph_sendsmtpemailasync, ph_sendsmtpemailfileasync, ph_setdeviceval, ph_setothercounter, ph_settemps, ph_settstat, ph_shutdown, ph_snapxml, ph_split, ph_storevars, ph_sumnum, ph_timedeventsinfo, ph_trim, ph_urlescape, ph_varsub, ph_x10other, s2h 

Changed Functions: 
ph_devicebtn, ph_getdigitalstat, ph_getinsteonctrl, ph_getinteonstat, ph_getvar_d, ph_getvar_dt, ph_getvar_n, ph_getvar_s, ph_getvar_t, ph_insteonctrl, ph_modifytimedevent, ph_rtne, ph_runasuser, ph_sendsocketdata1, ph_setanalogout, ph_webaddblob, ph_webds